<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>正则表达式中的i与g模式修正符</title>
</head>
<body>
    <script>
        let hd = "houdunren.com";

        // i模式不区分大小写
        console.log(hd.match(/U/i));

        // g模式搜全局
        console.log(hd.match(/u/g));


        console.log(hd.replace(/U/ig,'@'));
    </script>
</body>
</html>